{% extends 'blank.html.twig' %}
{% block body %}
 <nav class="breadcrumb"><i class="Hui-iconfont">&#xe67f;</i> 首页 <span class="c-gray en">&gt;</span> 用户管理 <span class="c-gray en">&gt;</span> 用户列表 <a class="btn btn-success radius r" style="line-height:1.6em;margin-top:3px" href="javascript:location.replace(location.href);" title="刷新" ><i class="Hui-iconfont">&#xe68f;</i></a></nav>
 <div class="page-container">
     <div class="text-c">
         <form action="{{ path('adminuser_show') }}" method="get">
             日期范围：
             <input type="text" name="start_time" class="input-text" id="countTimestart" onfocus="selecttime(1)" value="" style="width:120px;" >
             <input type="text" name="end_time" class="input-text" id="countTimestart" onfocus="selecttime(2)" value=""  style="width:120px;">
             <input type="text" name="username" id="" value="" placeholder=" 用户名" style="width:250px" class="input-text">
             <button name="" id="search" class="btn btn-success" type="submit"><i class="Hui-iconfont">&#xe665;</i> 搜用户</button>
         </form>
     </div>
     <div class="cl pd-5 bg-1 bk-gray mt-20">
            <span class="l">
                <a href="javascript:;" onclick="datadel()" class="btn btn-danger radius"><i class="Hui-iconfont">&#xe6e2;</i> 批量删除</a>
                <a class="btn btn-primary radius" href="javascript:;" onclick="user_add('添加用户','{{ path('adminuser_add',{'flag':'add'}) }}','','510')">
                    <i class="Hui-iconfont">&#xe600;</i> 添加用户</a>
            </span>
         <span class="r">共有数据：<strong>{{ pagination.getTotalItemCount }}</strong> 条</span>
     </div>
<div class="mt-20">
<table class="table table-border table-bordered table-bg table-hover table-sort table-responsive">
    <tr>
        {# sorting of properties based on query components #}
        <th>{{ knp_pagination_sortable(pagination, 'Id', 'a.id') }}</th>
        <th{% if pagination.isSorted('a.username') %} class="sorted"{% endif %}>{{ knp_pagination_sortable(pagination, '用户名', 'a.username') }}</th>
        <th>qq</th>
        <th>微信'</th>
        <th>手机</th>
        <th>{{ knp_pagination_sortable(pagination, '邮箱', 'a.email') }}</th>
        <th{% if pagination.isSorted('a.lastLoginDate') %} class="sorted"{% endif %}>{{ knp_pagination_sortable(pagination, '最后登录时间', 'a.lastLoginDate') }}</th>
        <th>最后登录ip</th>
        <th{% if pagination.isSorted('a.status') %} class="sorted"{% endif %}>{{ knp_pagination_sortable(pagination, '用户状态', 'a.status') }}</th>
        <th>操作</th>
    </tr>

    {# table body #}
    {% for item in pagination %}
        <tr class="{{ cycle(['success','warning'],item.id) }}">
            <td>{{ item.id }}</td>
            <td>{{ item.username }}</td>
            <th>{{ item.qq }}</th>
            <th>{{ item.weixin }}</th>
            <th>{{ item.telephone }}</th>
            <th>{{ item.email }}</th>
            <th>{{ item.lastLoginDate }}</th>
            <th>{{ item.lastLoginIp }}</th>
            {% if item.status == 1 %}
                <th>正常</th>
            {% elseif item.status == 0 %}
                <th>失效</th>
            {% elseif item.status == -1 %}
                <th>待审核</th>
            {% endif %}
            <th></th>
        </tr>
    {% endfor %}
</table>
{# display navigation #}
<div class="navigation">
    {{ knp_pagination_render(pagination) }}
</div>
</div>
</div>
{% endblock %}